Intersoft WebTextEditor Documentation
How-to: Save a document to WebTextEditor
See Also Send Feedback
Intersoft WebTextEditor > WebTextEditor > ToolBar > Perform Document Properties Actions > How-to: Save a document to WebTextEditor

Glossary Item Box

WebTextEditor provides a method to save the content to a document during server-side event.

In this topic, you will learn how to save a document.

To save document to WebTextEditor

  1. Set the EnableDocumentSave property in the WebTextEditor to True. This will add a new command, Save Command, to the WebTextEditor toolbar.
  2. Call SaveContentToFile method during onSave WebTextEditor server side event. Here is the snippet:
    C# Copy Code
    protected void WebTextEditor1_Save(object sender, WebTextEditorSaveArgs e)
    {     
       WebTextEditor1.SaveContentToFile(HttpContext.Current.Server.MapPath("./SampleHtml/SavedFile.html"), WebTextEditorHtmlDocType.XHTMLDocType);
    }
    

See Also

©2013. All Rights Reserved.